import React, { useState, } from 'react';
import { Breadcrumb, Input, Button, Table, Switch, message } from 'antd';
import '../../../views/Index/Logss/Logss.scss'
import type { ColumnsType } from 'antd/es/table';

interface Props {

}

interface DataType {
    key: React.Key;
    name: string;
    people: number;
    ming: string;
    said:string
    add:string
    time:string
}

function Logss(props: Props) {

    const [list, setlist] = useState<DataType[]>([])

    const columns: ColumnsType<DataType> = [
        {
            title: '操作时间',
            dataIndex: 'ming',
            key:'ming',
        },
        {
            title: '操作人',
            dataIndex: 'said',
            key:'said',
        },
        {
            title: '操作模块',
            dataIndex: 'people',
            key:'people',
        },
        {
            title: '操作内容',
            dataIndex: '1',
            key:'1',
        },
    ];

    const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
    const [loading, setLoading] = useState(false);

    const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
        console.log('selectedRowKeys changed: ', newSelectedRowKeys);
        setSelectedRowKeys(newSelectedRowKeys);
    };

    const rowSelection = {
        selectedRowKeys,
        onChange: onSelectChange,
    };

    return (
        <div className='logss'>
            <div className="one">
                <Breadcrumb>
                    <Breadcrumb.Item>
                        <a href="">设置</a>
                    </Breadcrumb.Item>
                    <Breadcrumb.Item>
                        <a href="">操作日志</a>
                    </Breadcrumb.Item>
                </Breadcrumb>
                <p>操作日志</p>
                <div className="sou">
                    <div className="left">
                        <span>操作人:</span>
                        <Input placeholder="请输入" />
                    </div>
                    <div className="right">
                        <Button type="primary">查询</Button>
                        <Button>重置</Button>
                    </div>
                </div>
                <div className="two">
                    <div className="top">
                        <header>角色列表</header>
                        <div className="you">
                            <Button>导出</Button>
                        </div>
                    </div>
                </div>
                <div className="taber">
                    <Table rowSelection={rowSelection} columns={columns} dataSource={list} />
                </div>
            </div>
        </div>
    );
}

export default Logss;